
def findItemByField(items:list,fieldName:str,fieldValue):
    '''从items中查找fieldName = fieldValue的元素'''
    items = [i for i in items if str(i[fieldName]) == str(fieldValue) ]
    if len(items)>0:
        return items[0]
    else:
        return None
